select count(*) as tot
from pwc.contacts,pwc.lots,pwc.orders
where pwc.contacts.taxcode= :cf
and pwc.orders.id <> :ord            
and pwc.contacts.lot_id=pwc.lots.id
and pwc.contacts.status='8'
and pwc.lots.campaign_id in ('5','5_deu','f68d4720-8d92-466f-98d0-6a8e3655c8dd','a75a206e-1734-4901-975e-681aa9e7be15','4ecdbb42-bd95-484a-a5e6-bbcdc740bb55','6bd85b71-7a3f-4026-8073-57cb445b11c2')
and pwc.contacts.id=pwc.orders.contact_id